various code clean-ups that do not change the logic