e2e tests running

Q's catch(), done() and fin() are a big help
convert "function foo() {}" pattern to "var foo = function() {}"