Finish testing and fixes to a few small bugs.