some code clean-ups