Little refacto on min