First pass tutorial-prepping the optimization code.