Better recovery implementation after new rescheduling code + cleaning/style