Fixed broken main file, just needs newer plot and bug squashing