Completed a round of refactoring and debugging.
Moved some ui info to resource xml files.