Replace magic string keys with constants