filetype/1 fix

Compaction of code