cleaning up cdk implementation so we could easily switch to using raw h values
as well as visualize the gibbs chain if we want to
fixing bug in cdk