Refactored parts of comm.py to reduce length of _monitor
Merge remote-tracking branch 'upstream/devel' into devel