added type mismatch check, property n_val different on source, sink; cleanup