Cleanup.
Improved tests.
Factoring and cleanup.
Factored out an Options class.