ID#138: added another bunch of validators and fixed some minor bugs.
ID#138: added another bunch of unit tests.