Clean up Token masks to fit Group and Dictionary features.