added command loop and usage string
added rest of methods for interactive tool
move graph code to separate module
add failure message