Created an explicit validator tool and reorganised supporting modules