Better exit handeling.
Merge branch 'dev'