Fixing most eslint and testing errors/warnings reported