start refactoring for 2.0 (still lot's of work to be done)