J-M-L:
You can attach files if they are more than 9000 charactersCan you post in full the message you get at the end of the compilation (when you say “the program storage space increased from ~50% to about ~90%.” Do you really mean flash memory? using 90% of it is not an issue. If this is SRAM then that leaves you with not a lot for dynamic memory allocation at run time and might be indeed an issue)
I'm not sure, I was just copying what the compiler said. Sketch uses 26340 bytes (91%) of program storage space. Maximum is 28672 bytes.
Global variables use 1095 bytes (42%) of dynamic memory, leaving 1465 bytes for local variables. Maximum is 2560 bytes. And I have attached the 2 files above