Data serialization added. Works, but awful implementation...