Move diff/show code into library itself, add interactive mode