Updated to keep track of required token flags