Changed database design, added classes