Adds the parts functions in main.js file.