AK5 to AK4, re-redux

Rebasing PR #5350. 

Switches AK5 to AK4, including all of the changes from @arizzi, @vadler and others. Will break the relvals until the latest GT PR is merged as well.