Modified sql script to not use Message table and renamed tbl_link to tbl_tack