Fix optparse_long() segfault.
Split up large function.
Add comment.
Cleanup a little.
Add argument permutation.
Fill out more documentation.