Major refactoring, to use expressjs

Needs more work - firing not working at the moment.
Lots of small fixes and some new tests, more documentation