Refactoring dai util code to have name/type mapping for CPT generators. Also starting methods to setup EM calculations