Refactor option defaults and trim whitespaces