Improve typing of constants