Fixed edit wiki scripts

Fixed one problem of issue #59.

I did also a small cleanup of the code