Added some moar debug outputs
Added some more comments to the code
Fixed a mistake in DP output