Massive cleanup commit (and probably more to come).