some cleaning and reorganization