add active_record and refactor requiring model classes