More refactoring and multiple commits and changes