Formatted main layout and added a custom adapter