Separate the getOptions logic.