Fix test to check for correct Exception
More cleanups (thx zzz)