Cleaning up, documenting and testing Statement objects