Cleanup - converted prints to debugs and removed dead code