Add lots more tests, fix a couple of minor things found from tests

Test Plan:
- Runt tests, make sure they pass