Refactored models to address #14 and added new tests for it