increased the display size to 1027/768, refactoring and cleaning