Organized the sortSearch methods, miner code modification