Adapted code for AbstractEntity removal

* Fixed some typos as well