replacing unsafe strcpy operations
further const'ing