Small refactorings as suggested by @jtratner