Move some configuration values into constants at the top of the file. Replace some if statements with switch-case to facilitate adding more user stores in the future.