Added headers to better structure the algorithm definition