Implemented looping calculation.
Corrected comments.
Cleaned up.
Filtered layer renderings.
Merge branch 'layersArray'