Removes unused function.
Replaces printks with better alternatives.