Minor changes to the code, adding a very simple example