Refactor argument handling
Merge pull request #7 from alexcruice/refactoring

Refactor argument handling