fix(core): linting errors & reduced function complexity