ftdetect: move to separate files