Implemented controllers. Added support for xml representation.