Removed dependency on strdup