Improved output formatting
Add sorting by priority