Add more browser test coverage and clean up test code
Merge pull request #207 from kurtw/add-tests

Add more browser test coverage and clean up test code