split option processing into its own file