........S. [ZBX-7887] fixed style, added comments, fixed warnings