Code cleanup, for consistency between FilterSelection and RunCommand