Fix a few errors and remove console.log stmt.