CMS histogram functionality

This PR closes issues related to histogram functionality and features. Two other issues remain that are related more to documentation so will address them in separate PR.