move expandable template out of core