Filter improvement

Minor improvements:
- `run_filter()` refactored to be independent of the filter keys
- commands alphabetical sorting