Added 2D function to JSON readers, fixed 2D polynomial fitting