Cleanup of primitive-specific aggregate implementations and some documentation.