add resource_uri and resource_link fields and change some variable names to be more descriptive
fixed problems with some fields