Added initial validation and validation tests