Updated Analysis and ProcessTree handling logic