Added tree directive for guides and added resolve for controllers.