Clean up code to grab command-line arguments