Extracted some static inner classes of grep to its package