slight refactoring of header and main sections