Refactored options to opts