Fixed a bunch of obvious bugs.  Version 0.1.1.