Added the option to install user preferences.
Refactored utility functions.