major refactoring for 2.0-SNAPSHOT