Fix audit issues and tests