replaced $.remove with helper function and updated menu to not depend on $.data