Common menu logic moved to client side