Encapsulate the function to not pollute namespace
Make the exposed function public

Simply fix a bug that caused the functions to not be called (due to
previous commit)