Added Entity class
Misc changes