Extracted hardcoded preference keys.

Extracted hard-coded preference keys.
Makes code easier to read and write.