simplified code, which is now less robust but smaller and easier to read (comment Babushkin)
formated source code with fix_code_style.sh (comment Babushkin)
fixed Copyright (comment Babushkin)