Added sensible exceptions.