- moved tilemanager into its own class