Refactored the main layout to use LinearLayout.