first set of fixes for refactoring changes