Small improvements
Some further improvements, mainly to do with exceptions