XY and XY3D: use the common function to load the kernel file

Issues #80 and #81

  Reviewed-by: Andre Loureiro