Start of major refactoring for version 2.0.0