Fixing misc. issues related to refactoring.