fixed citations/references thing, the sort bug, and some style stuff