General cleanup and reorganization, more to come.
(I may have broken something I don't remember right now)