Do not use magic numbers

Remove two usages of magic numbers. Deduplicate existing magic-number-lookup
code. Add one more fixme related to magic numbers.