Coding style

Here is set of patches aims to improve code readability. Program's logic not touched, only code style and inlined documentation.