R: more layout refactoring.