Full support for rp_permitted filters using new filter structures, etc.
Clean up compiler warnings (and likely bugs).