Removes rogue console.log and tidies up var namimg