Implementing layout.