Add configurable user_cls parameter, fixes #53