General code clean-up