Implementation of all major algorithms