Tidied storing original PE
Added code to introduce metropolis noise