Refactored tile creation.
Refactoring: making code easier to read