Revert "Revert "Filetypehandler""

This reverts commit a42009a593b7cc2982c06387c7c9a053accfb3ff.