Fixed bug
Moved some method from service to entity