keepInside method now belongs to the Display class. Now the dimensions of the screen is no longer hard coded inside the method.