continuing to tidy up formatting; rewrote creation of reg.E.K.