Some minor cleanup and naming refactoring