Preparation for Pathfinding revision

Added SetSelectedAgent function to Application Class, ideally
pathfinding should only be done when a new Agent is selected.
Fixed Compile Error

Added proper brackets to a function call from the last commit.