refactor node to have a separate class for Primitives. Makes potential extension easier