Adds a slew of new unit tests, fleshes out browser test coverage, and fixes existing but broken browser tests.