How can I smoothly sugar the rim?
The clumps come from too much liquid on the glass when applying the sugar.

The way I learned to salt a glass was to dip the glass upside-down in a shallow plate or bowl of water, let it drip for 5-10 seconds, then dip it into an evenly layered plate of salt.  I think this should work for sugaring a glass.