Refactored the getOpts code slightly

Still non-functional.