refractoring almost complete. tiled support missing