What's up with those magic numbers?

I'm definitely open to suggestions on how to better handle this case.