Cleaning up hardcodes in core TheSS code. Fixed encoding setDefault for tests.