Emit 'end' when complete
Merge pull request #3 from sublimino/master

Emit 'end' when complete