Added a basic test to test for required fields
Pass the tests for basic requirements on ajax parameters
Did some awesome refactoring