Fixed ipython formatting; refactored section 3 into 2 sections