cleaning up keyPressed function
deleting comments and creating constants of the width and height