Refactoring and Persistence Implementation

Refactored a few things in the Domain layer, and started the implementation of the persistence layer.