Moved validity checker into separate file