Code review, part two, fix bugs