Code clean-up to PF standards