Refactored main application class
more changes to javascript ui library