Fixed bug where null was being added to validation states.
Fixed scratchpad page.
Updated latest code and tests.