Some style changes

- qDebug instead of std::cerr
- return instead of exit
Merge branch '221-instanceAdded-signal'

* 221-instanceAdded-signal:
  Some style changes