in reply to Avoiding hard-coding

This is a known problem, and solved by a gazillion of applications. It usually goes, in precedence order:

Abigail