Added unittests, more work needed