some clean-ups and changes