Refactoring as per JustCode warnings.