Reorder method defintions to match declarations

Make sure that the order of each method definition in .cxx files matches
that of the declaration in the corresponding .h file.

Also reorder a couple of declarations to give priority to more
"important" methods.

Closes #31.