improved exit code handling, application stops if server crashes
Removed TODOS