Minor fixes, tidying up