Made the debugs self contained with respect to the serial communication.