fold in changes from closedsource. add md5 hash checking. improve comments. improve syntax. sorry for mixed commit.
fold in changes from closedsource. add md5 hash checking. improve comments. improve syntax. sorry for mixed commit.

nerflad/palp