[WCP] Making usable as a module and as a command line tool