Added a generalized reflex agent

Also improved output