Reorganized validation into separate package and files