added basic data serialization.
improved documentation and serialization