Replace magic numbers with global variables