Added model classes, improved Map logic