Extent refactor

No need for filetype param. Simplified the function.