Move validation function to validation file.
Remove un-used includes.