more fixes and cosmetic tweaks

Signed-off-by: unknown <trpb2@EPIDPC147.mrc-epid.cam.ac.uk>