some more clean-up and optimization