Minor name changes and refactoring