Remove logorithm dependency
Re-arrange imports
Optimise global flag handling

* scope flags to main function
* wrap all global flags in a Globals type and pass to sub commands
* remove unused debug flag
Contain Command.Run

* Run has to return error
* logging in central place
* args are not used
Improve code reability

* explicit returns
* bundling consts and vars
* remove unnecessary calls