Started refactor for version 2.0