some code clean up.