Ensuring to use local functions to not pollute global function table