Fixed a null check in emitter.on(error)
Moved around / removed some tests
Refactored connection code, esp subscribe and submitOp.
Moved most tests out to oldtests/ and started re-importing them