Clean up Selenium tests

The tests are not completely working, but they are better now.