refactored getTrap helper function so it doesn't cons a bound function per trap invocation
added html test harness for testHandlers.js