Add close support
Merge pull request #12 from sykopomp/master

Add close support