Changes to conform file reading to c++ standard rather than c
Other changes for better integration in xraystudio