Implement tiling sprites for the buildings

Refactor building in own js file