Refactor. Move all CMB js inside the CMB object