cleaned up pathfind; added entity