Actually write shortened URLs to db, and store them in proper format