small refactoring of the Library#process_opts method