Remove filetypes
Use lambda
Refactor