Updated documentation and fixed bug in rule completion.