Refactor configure action