Add main.js, and introduce functions
Add functions to prompt.js