removed unused functions, move functions to entity manager class