graph/serialization: function declarations and definitions brushed up due to the compilation problems on windows