Splitting serialization into two steps.
1. Retrieving Node object
2. Writing bytes from Node object