fix(core): allow to use editor hooks correclty and improve code style
test(unit): add last unit tests for full code coverage