swapped child_process.exec for child_process.execFile, code cleanup, plus other minor tweaks.