Make better implementation of menu tracking