Initial unittests and code.