Starting massive refactor for v2.0