Made the backend code for attributes more modular.
Made the code for appending the URI to the dict returned
by the SQL query.