Due to some fairly unique customer requirements for bibliography, we're using the simple bibliography discussed in the wiki (http://wiki.contextgarden.net/Simple_Bibliography).  While this approach gives us more flexibility, I'm having trouble with a couple of things...

1) The code below wraps the reference number in brackets.  How would I make the reference number superscript (like an endnote)?
2) The references in the text are numbered in the order the bibitems are defined in the bibliography, not the order on which they are cited in the text.  How would I order them according to the order in which they occur in the text?

Thanks,
Mike Santy

\setupinteraction[state=start]
\definereferenceformat[cite][left={[},right={]}]
\defineitemgroup [bibliography] [levels=1]
\setupitemgroup  [bibliography]
                 [symbol=n,
                  left={[},
                  right={]},
                  width=1.5em,
                  stopper=,
                  itemalign=flushright,
                  inbetween={\blank[4pt]}]
\appendtoks
  \let \bibitem \itemgroupitem
\to \itemgroupcommands

\starttext

Now is the time\cite[ref2] for all good men\cite[ref1].  I would like the citations to be numbered based on the order in which they occur in the document, not in the bibliography.

\section{References}

\startbibliography
  \bibitem[ref1] This is my first reference
  \bibitem[ref2] This is the second reference
\stopbibliography

\stoptext