Changed write to conform r7rs, added write-shared and write-simple