Add active record and refactor requiring model classes