Refactor drawTile to be more readable