Enhanced validation module, fixed #81
Added more stable DOM generation algorithm

Fixed #80