Improved 'sort' method, added 'aggregate' method', documenting