Added documentation, and reordered class/object declarations.