Enforcer implementation and bug fixes