Cleanup algorithm.py