Refactors init improving speed and consistency. Log system has been modified too.
Defines deafult log granularity depending on build type
Merge branch 'init-refactor' into next