Code cleanup (thx sonar)