Added basic commandline util. Slightly better graph building. More unittests