Refactor based on input from Kevin.