More interval fixes.

This adds a bunch more tests to help catch interval bugs.