Created callback functions for on open and on close.
Removed debugging code.
Merge pull request #20 from bmarshall511/2.2.0

2.2.0. Created callback functions for on open and on close.