removed duplicated code
centralized parsing of resource pages
new definitions for resource pages
typo