Code cleanup, part 4