Update serliazer to use the same class loading logic