Added "sort" parameter for summary methods
Refactoring examples