initial import of major refactoring
initial import of major refactoring