code style and tests
Merge branch 'ivan' into dev