Added filtering capability
Removed some code that was commented out