Remove debugging statements.
Fix argument parsing logic.

There were several small bugs in the argument parsing logic that added
up to a huge annoyance. These have been fixed.