Added some entity code