clean-up and shrinking of content