added model unit tests and set appropriate not-null fields on db objects to enforce data integrity