gate mats better defined to prevent segfaults, bins now better at filtering using S and V instead of H