Refactored filter less code