Added NIL implementation of eventHandler to remove some ifs from the code.
removed an unnecessary stringWriter construction