Test suite for CNF

This test suite fixes some issues; however there are still some failures. Maybe the best would be to merge it as it in the the trunk, and fix the problems later.