added event handling

many changes to remotedecument.py
some changes to the example
some changes to readme