Automatic Action Triggers

Some sanitization and related fixes.