cleaned up code
better structure of the tile class