Refactored AJAX and Request objects.  Moved tests to controllers.