Add some validation tests and some comments

Signed-off-by: Vlad Velici <vlad.velici@gmail.com>