fixed race condition with collector ready function
minor cleanup, changed tests to use @collector.on 'data'