Move option resolution into util file