factored out some bits to re-instantiated python library
updated lib
updated lib
added indent args to printerr
changed exit codes to use ERRORs dictionary