Fix typos in log output.
Added test for sampling a negated variable.
Added test for fixed weights.