Updated sync script and implemented the change

Added sync between list and database, with the option to delete