Added the ability to wait for 'listen' event rather than 'ready'