removed some dead code, added comments

Author git <vivec@telvanni.eu>
Author date 2018-02-11 17:02:55
Author local date 2018-02-11 18:02:55 +0100
Committer git <vivec@telvanni.eu>
Committer date 2018-02-11 17:02:55
Committer local date 2018-02-11 18:02:55 +0100
Commit a9271a7dfcbd0b87fe583ce715ab9e70fa69a82b
Tree 099fcc51509738125769066d53874607b959b7fb
Parent e89689e2c4249a935d6373b83df1b6b8897868ed
removed some dead code, added comments