Revert "Spliced chooseLayout and doLayout"

This reverts commit abaacee4be6b2b67975abbe0b49dc84312f41145.