Compacted awful rules, added libreoffice rules...

...and updated manage signal handling.