Added two methods: serialize() and deserialise() to ease work with module.