Fixes file saving and TextPanel bugs, updates unit test