Added json

* finished (for now) log. Probably gonna replace it later.
* added json support for configs. Need to evaluate and may be replace
too.
* a lot of small changes