GUI is not resizable now and some minor refactoring