started the real refactoring work