ENH: Refactor to ext