Extracted ring.js