Major code cleanup.

Produces a lot less terminal noise. Hopefully didn't break anything. :)