restructuring and clean-up