hash verification added and memory leaks fixes
Function to find number of cores added and other minor changes