Partially removed all references to STL's algorithm. <algorithm> is not included anywhere, though still used in several places which still alows the code to compile as <algorithm> is being pulled in from some other standard headers.