Add ability to switch between grid layout and list layout.