Adding code to support mode from command line. Adjusted quotes for consistency.