Some polishing of the code
Removing logging