[tor-commits] [sbws/master] Refactor in order to remove bulky function