Cleanup of protocl.py