Add database reading and url building