Add XOR factor function
Better example template configuration.
Allow capitalized factor functions
sampler update