Small refactoring fixes...