clean-ups and fixes