Updated to new constructor for dblayer, fixed check on positionField, added check that the search field is not in ref: preparing for future changes with it