Code cleanup, part 3