some js changes and structural changes to header