Lots of small changes and reorganization