gui update, comments and refactoring