Now an imperative style operation. Removed all the classes and the entire process can be handled from inside an IPython Notebook