Refactore complete extension.