Shouldn't log the secrea
removing some dead code
Adding some tests