Improved locators, added tests, refactored code.