Exception tests + some fixes.