Adds a few functions before serialization begins