Remove 'autopublish, insecure' packages and add code for security reasons.