Minor improvements and reorganization