Move all the tests into one folder

- Cleanup jshint failures
Use setImmediate instead of process.nextTick

Behaves more like the original code.