Latest refactor code.