added calibration to search, refactor search function to core, reformat search results, add permissions to search results