Update refactor code