Progress on code clean-up