GUI; fixes; refactoring;
TODO: preferences are buggy intermittently (hide checkbox is not set after resetting, MainActivity fails after changing preferences);