general code clean-up