Fixed some minor bugs.  Added ruleset support. Added some additonal switches for convenience.