Add base aggregation query methods.
Improve material storage