Deleted all console.logs because this breaks the code for IE