Various tests and implementations of algorithms