many improvements to BaseModel and how Formation handles pivot table data