Moved all of the tile map stuff to a separate class.