Added unit tests and examples