Stmt close

Fixes #102 
Fixes #103 
Fixes #104