Various updates and fixes, AMI sanitization