Refactor a bit more