fixed tile collision detection, new internal structure