Fixed multiple syntax errors and tidied console log messages.