Refactor to interpolate tabpanel variable.