Ported to use GLib supporting routines (GSList and co.), parser re-write.