various fixes and minor additions. added more algorithms.