This could also be cleaned up to use `getOption`.