Add support for weight in rules.
No support for actually using that weight yet.