reviewed adrelanos' changes:

* fixed syntax and structural errors
* fixed warnings of lintian