Fix Memory Errors

1. When creating a new profile, use 0-d memory.
2. When creating the output for list_profiles,
   do not overwrite the string every time.