Code formatting

Add main content section to pages. Cleaned up functions file.