Comments some parts of algo for testing
Correct bugs