Adds an endpoint for /preferences/:id GET.

Also, corrected the structure of the database slightly.
Adds the PUT method for /preferences