Added more plotting and csv functions