Improve Test Coverage

Add a bunch more tests to cover some previously unexplored corners. No new bugs discovered :)