For anyone wondering this is a direct port from MCDS for PTC with compatibility changes.