Rough cleanup.

I'm not sure if this can be saved though.