Added unit tests for Selenium; refactored fakes