Misc tidying up.