Code Cleanup

Major cleanup of the code and internal APIs.  Everything is now neatly packed into the Untwister object, the CLI and Python interfaces are more loosely coupled. No more code in .h files.