Mainly revert "--filetype" change (fix it properly) and some more