Fixed some bugs and added one more example.