Reimplement regular and windowed aggregates