Fix all the tests, add minor fixes, add MDC and change log pattern