Fixes to the layout to remove need for hardcoded dimensions.