Actual Serialization Routine implemented

Not tested yet