Improved GUI code. Fixed bugs. Implemented pause menu and resume button.
Complete merge