Cleaning up, putting grid into a separate file