Changed design. Added BaseEntity