Implicitly test for version setting
Refactor how version and encoding options are passed
Clean up and add some documentation