Small refactorings/clean up