Features/flexible config

Reorganize the code to make the main.go shorter.
Replaced the `log` std lib by glog from google. `glog` is a very flexible logging library that let us control the verbosity.