Modified some of the if condition combination logic. Working for 15 out of 17 odd ball cases.
I may declare that logically useless combinations should just have undefined behavior... I may have to think about that a little more.

If I plan on generalizing it to work in 99% of situations, then combinations of unlike conditionals may/will probably be required.
I'm also adding demo.js to the file so I can easily sync the tests to my other workstations, however this file will need to be removed (and .gitignore restored)
before submitting a pull request.