Adding random and format functions to utils.js
Modyfing code that defines random and format to get it from utils.js instead