Refactored whitespace validation to external file