OSNG-10 - added tests, improved code metrics