min refactor tests & add dbg info