Added on application start and stop hooks.