Okay, let's merge in new api now

In addition to the new API being mostly on par with the old API now (minus network arrays) this also includes some improvements to unit testing (as there were some discrepancies between old and new), and the ability to serialize models to JSON or Pickles (also helpful for finding the discrepancies).