Refactor of FilterTasks

Added meaningful comments and renaming of variables + removal of magic
string/numbers. Making it more readble for future dev.