Added and expanded unittests.