link: use G_DEFINE_BOXED_TYPE and indentation cleanup