Code cleanup, part 6