command-line tool
errors and small bugfixes