Refactoring QueryFilter and implementing new options / special commands