libserialize: Code cleanup