Minor changes and added a demo.