Tiny refactorings

While scanning the code I found some possible improvements.

WDYT?
I'm :+1: for this one.