Basic file reading fuctions in place and a plotting function.