Change numeric values to class constants

Fixes ticket #1894