refactoring, moved CypherWriter and JSONWriter