class added, html safe moved

jsonKeys class added. basically an enum of the associative array keys used for toArray, which has a major purpose of being a json object. the html safe method moved to the controller, in an abstract class that is inherited by the handlers