Main.js created.

Main file of the function.