Refactored argument processing into its own class, ArgumentProcessor.
Added argument processing tests.