Refactor 2.0 branch