Minor refactorings

Simplified logic removing unnecessary variables, removed duplicated logic which is available on `helpers.getConfig()`