unit tests for eventhandlers, evaluation.getState method, fixes + cleanup.