Use same options implementation.
Remove duplicated code.