Pcd recorder improvements

Here is a new pull request without the changes to memory size calculation.