Implement layouts

Implement layouts.