Improved the layout and view implementation.