removed old debug code
added validator library, ported from rock 1... basically rewritten the thing