Fixed a bunch of bugs; fixed my git repo setup

I don't know quite how I did it, but somehow I started committing not on
a branch. Everything has now been merged onto the master branch.