Refactor for options and default behavior