mass refactoring

mass refactoring