Refactor of extensions