Improved debug display and removed unnecessary/bad code

Signed-off-by:thehutch