Adjust layout.
Pass the groups as a parameter.