Some cleanup of error code an reactivation of init hooks
Merge branch 'develop'