Renamed and moved some stuff in the Entity class.