Hello Frank,
I was able to move the javascript below wp_head(), by changing the plugin add_action from wp_enqueue_scripts to wp_head so the nonce function is still working ...
I tried to place the autoptimze inline css from above <title> infront of </head> but without success ...
added to function.php
function my_ao_override_css_replacetag($replacetag) {
return array("</head>","before");
}
Ralph