v1, with tests, gc settings, loop delay, stdout output now optional
Merged with master