Changed some variables names and added notes to understand filter action.