Improvements and tests for layout generation.
Renamed "UserActionMessage" to "PostInstMessage".