Some code clean-up