CollisionMap class refactored