Refactoring.

Refactored following:
* Variable names.
* optparse help strings.
* Function names.
* Function arguments and return values.
* Conditional branching.
Merge pull request #3 from daniel-star/refactoring

Refactoring.