Use shared_ptr for constants in constantCategory