Fix timed detach of output view

`setTimeout` binds `this` to the global object. This gets around that.
Make sure detach has the right context here too
Merge pull request #43 from Raynes/master

Fix timed detach of output view