Misc fixes on resource module
Fix validation for resources; Fix doctype for resources