Documented most of the javascript. Added automatic testing on document load. Updated some logical statement in addEvent and addAssertion.