Refactor code to make use of donor codes #173