added support for applications and scenarios, everything covered with tests