Refactored code to have proper output . Updated the class references and corrected the filter implementation .