refactored Layout.Invoke() to make calls clearer