Added functions for filtering plans.
New tables were added.