Removing unused imports.
Adding arguments for some hardcoded defaults

To achieve this, I restructured the option handling code, which
involved restructuring the initialization code.  Over all, this
should do the same thing but the code should be more clear, with
fewer repetitions when modifying the option handling code in the
future.  Over all, the code is shorter and more clear.
Merge branch 'unused-imports'
Merging branches: whitespace, imports, args.