Moved a alot of code from player to entity class.