Increased code readabilty.

Some code segments was changed or removed. Comments was added. Variables
renamed.