Front end refactoring and ui cleanup.