comment filter and some refactoring to allow mapping of filter command to filter criteria