Add IPS policy selection, auto-flowbit resolution and bug fixes.