Fixing pass by reference errors
Finishing tests for UserPreferenceValueRepository