Creating resource objects

Reporting number of resources per RECORD
Merge pull request #15 from pjakobsen/master

Using objects for packages and resources makes this code far more maintainable