Refactored Database and moved to EF