Refactored the filters
Added comments