Refactored parts of comm.py to reduce length of _monitor