Search algorithm imported into new structure
Reorganised a little more in the returnResults function