Refactor a little bit more