[WIP] Better `@extend`

`@extend` refactoring.