Small refactor of last changes