Changes to improve audit deploy and for better PHP compat