Implemented new invalidation method; added filter hook.

.. and some other enhancements.