refactor extensions directory