Fix some tests
- Misc cleanup