Defining repeated functions - fix hoisting issue

Build 0110 - Working