Fleshed out now.
Added some unit test.