Cpt refactor

Refactored CPT to use constants and fixed errors with cli build