Added unit test, added JSON serializer/deserializer