making it ready for testing

- minor changes
- adding a demo.r to be run by testers