Consolidate hardcoded values and fix an error message.