change layout selection logic
Merge remote-tracking branch 'origin/routes' into routes