Changed all methods of adding a rule to reset an existing rule, therefore a rule can be edited by re-adding it with different arguments.
Added sub separateListNodes to handle nested lists. Incomplete.