Removed an unused function and removed a few remaining printf-statements
(replaced with logger callback).