Added logging capabilites and refactored some locators