This appears to be a solution to the above or at least a starting point so I’ll mark this as answered.