Who was responsible for ideological tasks of the written records