Completely rewritten existing code in PF L010103