Some more refactoring
Added validation library