code clean up and more documentation in notebook