Major options parsing refactor