Minor refactoring.
Adds basic argument parsing.