More refactoring to support 2.2