Refactored models and dbcontext. Added database initializer.