Improvements to phasing code & support for recording depth information