fixed some formatting errors and improved some debug statements in