Rationalise debug configuration and messages + general formating