Fixed potential DoS weakness.
Also removed some debug output and adjusted formatting.

Signed-off-by: retep998 <retep998@verizon.net>