So functions.php is clear.
File header.php upgraded.
Cleaned index.php; footer.php and fixed bugs in header.php.