new nin function for acme integration, assorted fixes