Remove obsolete --profile option.
Reorganize code.  NO FUNCTIONAL CHANGES.
Merge pull request #12 from cgay/simplify

Simplify