Adding restart and deploy handlers.