Fix unit tests and remove printout