Very large automated code cleanup

I should really do this before every commit.