Cleanup and re-ordering of elements

so that they appear in a logical order
of private, then public
variables, then properties, then methods