Adding FeatureCollection serialization test and fixing bugs until it works