major refactoring starting