major front-end refactoring
refactoring of controller and guicontroller