Refactored argument parsing, moved to separate file.