Added basic functionality to handle user-defaults.