big API update.  most functionality done.