remove debug flags, cleanup output a bit