Fixed performance issues by rewriting the tile engine to use simple objects and a manager.