Misc code clean up.