Improvements to GUI, refactoring on Window