MWTP: minor optimisations and corrections