Fixing a bunch of little bugs