cleanups in a code
updated the docs