Minor refactor to remove config dependency
Typo fi
Updated tests