Smoother menu transition
Use a centrally defined replace function