header and footer function tweaks
add some clears, fix the header search