Added first version for tiles, needs refactoring