Very minor fixes, changes and refactorings.