Refactoring of GUI a bit