Minor cleanup/refactoring