refactored validation; added validation to resources
fixed whitespace
tweaked validation for resources
Merge pull request #4 from a2labs/resource-validation

Resource validation