Update stuff to work again- still needs more comments/docs.