* Minor refactoring
* Fix race in app startup