Started unittests and code to pass them.