Added first draft of options to allow more flexible calls to main()