Small refactoring of code.