Fixes for various things, including node sorting for display and for saving.

It would appear that nodes stored in reverse order (or it might be because of older version reversing the order). This might be of interest for Issue #2