Cleaned up and fixed links in MAG templates