Update the database to remove duplicates, and update solution for issues #5 and #2