Refactored the domain model and mapping files. Unittests are still
commented. Need to fix the commented unittests.