Pulling in the new changes

Several refactoring changes