Improved plotting. Started to make safer and clean up