New test code for ocs functions + small bug fix in pmf