Refactor ring to its own package