Added new method to serialize classes with virtual methods.
Using serialization methods to avoid repetition.