more WIP on client side of demo

- removed used of globals
- added extra UI
- more comments and clarity for didactic purposes
- ...