General cleanup.

I probably destroyed readability, but this feels more organized to me.