Polished Notebook
cleaned up code and added comments