Added filtering and made sure that search and filtering play nicely together.