Updated to add frames to process list.
Free frames and pages on process exit.