Merge pull request #16 from sam-github/local

API  documentation, and use event emitter to fire the disconnect callback