Redoing plot script

Need a smoother way of accessing data.