Added base entity code