Added ability to search a reference layer