Cleaned up `algorithms.py` by implementing some properties in `network.py`