Broke ipython notebook out into python source files