Adding cpp and stan modifications