  In this paper we exploit the fact that a Cuntz C$^*$-algebra is a groupoid
C$^*$-algebra to facilitate the study of non-self-adjoint subalgebras of $O_n$.
The Cuntz groupoid is not principal and the spectral theorem for bimodules does
not apply in full generality. We characterize the bimodules (over a natural
masa) which are determined by their spectra in the Cuntz groupoid; these are
exactly the ones which are invariant under the guage automorphisms and exactly
the ones which are generated by the Cuntz partial isometries which they
contain.
  We investigate analytic subalgebras of $O_n, n$ finite, by studying cocycles
on the Cuntz groupoid. In contrast to AF groupoids, there are no cocycles which
are integer valued or bounded and vanish precisely on the natural diagonal.
$O_n$ contains a canonical UHF subalgebra; each strongly maximal triangular
subalgebra of the UHF subalgebra has an extension to a strongly maximal
triangular subalgebra of $O_n$ and each trivially analytic subalgebra of the
UHF subalgebra has a proper analytic extension.
  We also study the Volterra subalgebra of $O_n$. We identify the spectrum of
the Volterra subalgebra and use this to prove a theorem of Power that the
radical is equal to the closed commutator ideal. We also show that the Volterra
subalgebra is maximal triangular but not strongly maximal triangular.
