Location reporting from Agent + minor fixes

Agent updates location on server on the basis of which advanced
conditional forwarding can be done.