Moving GA code to head section