Revert "move expandable template out of core"

This reverts commit b6a28b686f9150433efac62f8d6696551fd61986.