improve GQuark handling and GError creation.

Screwed up last commits, created new one.