Remove exit from as much as possible backend code