some code clean-up/formatting