Reformatted code using Yandex code style (4sp, no tabs, KR braces)