Update upstream with refactor