Move filetype detection to ftdetect instead