add guard and spork support and DRY out static templates