Added eslint and refactored code base