Massive refactor of process_monitor.py

Now PEP8 complaint and generally more structured.
Rename pedram's XXX: naming scheme to TODO:

To let automated tools pick up what needs to be done.