Started tidying up exception handling