Refactored CategoricalVariable; created leaf type for non-BinaryVariables (MultiwayVariables) (CALC-164)
Merged with upstream