added some functionality to building
improved pathfinding, bug fixes