Removed $db->link references