refactor to make use of proper parts of the runtime

Jiri, this refactor make the app to work according to expectations. Please review changes and feel free to schedule a session where we can discuss that in details. Soon we will enter a documentation and bug fixing phase so that would be good time to verify what needs to be done to make the application development easier.