Adapted to use entity member functions

64 functions were moved and renamed, affecting lots of code.