Tidying and commendatry; refactor to enable further testing.
Tidying
WIP on ruleset tests; commentary.
Don't need any longer.
Further tests and commentary.