Integrated newvec into main code, removed its subpackage, translated tests.

Added some tests for representation conversion.