Added unit tests for model module.
Refactored data model to coincide with config module.
Resolved merge conflict after amend.