Odd tweaks to fix a few bugs, some more testing.