Fixing the failing tests. Made kompile check for undeclared sorts.