Refactored to separate options from parameters