Update from v1.2 moving toward v2.0
Some errors still exist. Refactoring still required.