Documentation update and code clean up.