Added unit test and some more examples.