Miscellaneous header code cleanup
Code cleanup along with additional touch-ups to header scroll behavior