Initial code for PivotJS