introduce GSON serializer. Some repackage of unit tests