Change 'scanning' to 'searching' for consistency
Update variable names and structure to be more standard
Update comments