SOme small refactorings.