Added Entity Framework

Added Entity Framework to the project  + Refactoring