* move consts to top * move some functions to validator.nim * add some validator functoin smoke tests