More refactor fixes