added tile map class + refactoring for require