Better menu positioning code.