Extra logging removed and slight refactor