Fixed a few JSHint violations and protyped a method for the handler to handle incoming arguments.