Tidying code after fixing bug with raise_exceptions.