Fix quality
Add cutom serialization to ram layer
More tests