Initialize local variables
Making sure hpx_main is executed only on rank 0
Adding missing include
Fixed warning