librarify CYP

Split CYP build into library and executable for better consumption by other tools.