Code cleanup

Removed many warnings by the use of old string and file methods. These
are updated to std