Altered StateHander and Parser classes.

Altered the way the parser was invoked and integrated it with
StateHandler. Also altered agent behaviour Leader and moved it to a
newly named behaviour.