Common ext detection code
Merge branch 'CoffeeDev'