Re-order Node layers and remove unused counting variable, see issue #21