Fix some imports.
Fix reference to validator.
Fix duplicate function name.
Rename unused variable to '_'.
Clean up some indentation.
Change variable name 'filter' (reserved) to 'filtr'.