Updated writestringtofile.R and added new composition.R files