Added profile preferences functionality.
Finished edit preferences view and tests.
Fixed conflicts with profile-preferences branch.