Finished locator functions and also refactored them heavily