Flex fixes and layout improvements.